<?php

  if (empty($_GET['letter'])) {

    header('Location: ./');

    exit;

  }

	$letter = $_GET['letter'];

	include('./init.php');

  $data = utils::gpc_check($_GET);

  $res = mysql_query("SELECT id_category FROM pages WHERE page_name='" . strtolower($data['letter']). "'");

  if ($res !== FALSE && mysql_num_rows($res)) {

    $lin = mysql_fetch_row($res);

    mysql_free_result($res);

    $id_category = $lin[0];

  } else {

    header('Location: ./');

    exit;

  }

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>TV Theme Music - <?php echo strtoupper($letter);?> TV Shows - TelevisionTunes.com</title>

<meta name="description" content="TV Theme music and songs from 15,706 different television shows. Listen to them all in MP3 format." />

<meta name="keywords" content="TV Theme music, tv theme songs, television songs, tv tunes, themes, theme songs, tv shows, tv music, television tunes, televisiontunes, tvsongs, jayzoo, mp3 tv music, theme music"/>

<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />

<link rel="alternate" type="application/rss+xml" title="RSS latest songs" href="http://www.televisiontunes.com/rss.php" />

<script type="text/javascript">

/* 

Script made by Martial Boissonneault � 2001-2006 http://getElementById.com

This script may be used and changed freely as long as this msg is intact

Visit http://getElementById.com/ for more free scripts and tutorials.

*/

var ie5 = (document.getElementById && document.all); 

var ns6 = (document.getElementById && !document.all);



var nextNews = 0;



function displayNews(){



var news = document.getElementById('cont').getElementsByTagName('DIV');

var objs = document.getElementById('cont');



	if(ie5 && !window.opera){

		objs.style.filter = "blendTrans(Duration=0.7)"

		objs.filters[0].Apply();

		objs.style.visibility = "visible";

		objs.filters[0].Play();

	}

	else if(ns6){

		objs.style.visibility = "visible";

	}



	if(ie5 || ns6){

		for(var i=0; i<news.length; i++){

			news[i].style.visibility = "hidden";

		}

		news[nextNews++].style.visibility = "visible";

		nextNews=nextNews%news.length;

	}

}

setInterval("displayNews()",6000);

</script>

</head>

<body onload="displayNews()">

<?php include('blocks/google-analytics.php'); ?>

<div id="wrap">
	<div id="header">
		<?php include('blocks/header.php'); ?>
 		<ul>
			<li><a href="index.php" class="active">Home</a></li>
			<!--<li><a href="browse.php">Index</a></li>-->
			<li><a href="game.php">Game</a></li>
			<li><a href="links.php">Links</a></li>
			<li><a href="search.php">Search</a></li>
			<li><a href="missing-songs.php">Wanted</a></li>
			<li><a href="copyright.php">Legal</a></li>
			<li><a href="contact.php">Contact</a></li>
		</ul>
	</div>

	<div id="content-wrap">
		<div id="main">
			<table border="0" width="100%" align="center">
				<tr><td height="5"></td></tr>

				<tr>
					<td colspan="2">
						<a href="<?php echo ABS_URL ?>index.php"><img src="images/TVGuy-small.png" alt="Television Tunes" border="0" /></a>
					</td>
					<td>
						<?php include('blocks/index.php'); ?>
					</td>
				</tr>
			</table>
			<table border="0" width="100%" align="center">
				<tr>										
					<td width="50%" align="center" valign="top">
						<h3 align="left" style="margin-left:30px;"><?php echo strtoupper($letter);?> Theme Songs</h3>
      			<div class="news-content-text" style="margin:5px 15px 0px 0px; width:350px; height:600px; overflow:auto;">
	        		<div align="left">
  	        		<table cellpadding="0" cellspacing="0">
    	      			<?php
      	      		$res = mysql_query("SELECT file_name,file_title FROM bj_audio WHERE id_parent={$id_category} ORDER BY file_title");
        	    		if ($res !== FALSE && mysql_num_rows($res)) {
          	      while ($lin = mysql_fetch_assoc($res)) {
            	        echo '<tr><td><a href="' . utils::create_href($lin['file_title']) .'">' . str_replace('.mp3', '', $lin['file_name']) . '</a></td></tr>';
    	        	    }
                	mysql_free_result($res);
		            	}
      			    	?>
          			</table>
        			</div>
      			</div>
					</td>
					
					
					
					<td width="50%" align="center" valign="top">
						<?php include('blocks/ads_mediumRectangle.php');?>
						<table width="300" style="margin-top:30px; border:1px solid #4d1516;" cellpadding="0" cellspacing="0">
				    	<tr>
				      	<td height="27" colspan="4" align="left" style="padding-left:15px; color:white; background:url(images/header-sites.png) no-repeat;">Check out these sites for more great songs.</td>
			        </tr>
				    	<tr>
				      	<td height="50" style="padding:5px 10px 5px 10px; border-bottom:1px solid #4d1516;"><a href="http://gamethemesongs.com"><img src="images/gamethemesongs.jpg" alt="Video Game Songs" width="47" border="0" /></a></td>
				      	<td style="border-bottom:1px solid #4d1516;"><a href="http://gamethemesongs.com" style="color:#7d1e1f;" target="_blank">Game Theme Songs</a><br />
				        <a href="http://gamethemesongs.com" style="color:#333;" target="_blank">For video game music and songs.</a></td>
				      </tr>
				    	<tr>
				      	<td style="padding:5px 10px 5px 10px; border-bottom:1px solid #4d1516;"><a href="http://tvadsongs.com"><img src="tinys/tv-adsongs.jpg" alt="" width="47" border="0" /></a></td>
				      	<td style="border-bottom:1px solid #4d1516;"><a href="http://tvadsongs.com" style="color:#7d1e1f;">TV Ad Songs</a>.<br> <a href="http://tvadsongs.com" style="color:#333;">For TV commercials with great songs.</a></td>
			        </tr>
				    	<tr>
				      	<td height="50" style="padding:5px 10px 5px 10px;"><a href="http://fcsongs.com"><img src="tinys/fc-songs.jpg" alt="Football Club Music" width="47" border="0" /></a></td>
				      	<td><a href="http://fcsongs.com" style="color:#7d1e1f;" >FC Songs</a>.<br> <a href="http://fcsongs.com" style="color:#333;">For football club songs from around the world.</a></td>
				      </tr>
			      </table>
					</td>	
				</tr>
				
				
				
			</table>
		</div><!-- content-wrap ends here -->
	</div>
	<!-- footer starts here -->
	<div id="footer">
		<?php include('blocks/footer.php'); ?>
	</div>
<!-- footer ends here -->
<!-- wrap ends here -->
</div>
</body>
</html>